package bugkillr;
import java.io.IOException;

import javax.servlet.http.*;

import html.HTMLWriter;

/**
 * @author Randy Bohrer
 * */
@SuppressWarnings("serial")
public class GettingStartedServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		HTMLWriter hw = new HTMLWriter(req, resp);
		hw.writeProlog("Bugkiller - Getting Started");
		hw.writeHeader();
		resp.getWriter().println("<h1>Getting Started</h1>"+
				"<p>Welcome to <em>Bug Killer</em>, a web game designed to help computer science students learn debugging techniques. "+
				" This page provides an introduction to the game and some basic useful information.</p>"+

				"<h2>Introduction</h2>"+
				"<p>In <em>Bug Killer</em> you play as a computer science student, working as an intern for <em>Denseware</em>,"+
				" the world's worst software company. Your goal is to survive until the end of summer, when you can return to school.</p>"+

				"<h2>How to Register</h2>"+
				"<p><em>Bug Killer</em> uses Google Accounts to handle registration and logins. If you do not have a Google account,"+
				" you can <a href=\"https://www.google.com/accounts/NewAccount\">create one now.</a> After you have created a Google"+
				" account and used it to sign in, you must register for <em>Bug Killer</em> separately. This is a quick and simple"+
				" process. All this does is add you to our database so we can record your progress in the game.</p>"+

				"<h2>How to Play</h2>"+
				"<p>The gameplay consists of a series of levels (Accessed throughout the <a href=\"problems\">Available Problems</a> page), each of which contains"+
				" a programming problem. In each problem, you are given a buggy C++ program, and an explanation of what it should do. "+
				" Your job, as an intern at Denseware, is to fix the buggy program. If you have trouble solving a problem, you can seek"+
				" help from other players, and each problem also has hints which can help you solve it.</p>"+

				"<h2>Teams</h2>"+
				"<p>You are not alone in your quest to fix buggy code, however. Through the <a href=\"viewteams\">Join a Different Team</a> page, you can join"+
				" a team of other players. On the <a href=\"highscores\">Team Rankings</a> page, you can see how well your team is performing compared"+
				" to the other teams, and how well you're performing compared to the rest of your team. Also, because <em>Bug Killer</em>"+
				" uses email addresses as user names, the team statistics page makes it easy to contact other players on your team"+
		" when you need help with a problem.</p> ");	
		hw.writeEpilog();
	}
}
